<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>transform-origin</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        div {
            width: 300px;
            height: 200px;
            margin: 100px auto;
            background-color: pink;
            /* 使用 transform-origin 指定旋转轴心 
                1 x y
                2 关键字 top left right center bottom
            */
            transform-origin: left top;
            transition: transform 1s ease-in-out;
        }

        div:hover {
            transform: rotate(30deg);
        }
    </style>
</head>
<body>
    <div></div>
</body>
</html>